package com.lhf66.service.impl;

import com.lhf66.domain.CatItems;
import com.lhf66.domain.SwiperData;
import com.lhf66.mapper.SwiperDataMapper;
import com.lhf66.service.HomeService;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

@Service("homeService")
public class HomeServiceImpl implements HomeService {

    @Autowired
    private SwiperDataMapper swiperDataMapper;

    @Override
    public List<SwiperData> getswiperDataList() throws IOException {

        List<SwiperData> swiperDataList = swiperDataMapper.getSwiperDataList();
        return swiperDataList;
    }

    @Override
    public List<CatItems> getcatItemsList() throws IOException {
        List<CatItems> catItemsList = swiperDataMapper.getcatItemsDataList();
        return catItemsList;
    }
}
